/******************************************************************************
 * RLT DSP
 * by Roberto Bender <beto.bender@gmail.com>
 * under GPL 2.0 license
 * 2009
******************************************************************************/

#include "nilfilter.h"
#include <math.h>

workingWord nilFilter(workingWord input, struct FilterParams* params)
{
    static float count = 0;
    static float gWawaAmp = 1;

    if (input > 45 || input < -15)
    {
        input = (char) (input * sin(count) * gWawaAmp) % 128;
    }

    count += (rand() % 1000) / 10000.0f;
    //gWawaAmp = rand() % 100 / 100.0f;

    return input; // always, nilfilter //
}

